<?php /* Smarty version 2.6.20, created on 2017-08-06 11:40:43
         compiled from shop_order.htm */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'truncate', 'shop_order.htm', 27, false),array('modifier', 'date_format', 'shop_order.htm', 28, false),array('modifier', 'get_city_name', 'shop_order.htm', 123, false),array('modifier', 'get_spot_model_name', 'shop_order.htm', 289, false),)), $this); ?>
﻿<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.htm", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<link href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/css/booking.css" rel="stylesheet" media="screen" type="text/css" />
<script src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/js/layer/layer.min.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/js/jquery.validate.js"></script>
        <div class="width_1210">
            <div class="top_first"> </div>
            <!--订单页面-->
            <div class="order_con" >
                <form id="order_form" action="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/?m=product&s=shop_order" method="post" onsubmit=" return check_data();">
                    <input type="hidden" name="act" value="order"/>
                    <div class="order_left">
                        <div class="order_data_con">
                            <div class="liuc"><img class="fl" src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/images/liucheng.gif"/></div>

                            <div class="cp_num_con">
                                <dl>
                                    <dt>
                                        <span>名称</span>
                                        <span>日期</span>
                                        <span>单价</span>
                                        <span>购买数量</span>
                                        <span>金额</span>
                                    </dt>
                                    <dd>
                                        <?php $_from = $this->_tpl_vars['product_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['vo']):
?>
                                        <ul>
                                            <li><?php echo ((is_array($_tmp=$this->_tpl_vars['vo']['pname'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 20, '...') : smarty_modifier_truncate($_tmp, 20, '...')); ?>
</li>
                                            <li><?php echo ((is_array($_tmp=$this->_tpl_vars['vo']['performance_start_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d") : smarty_modifier_date_format($_tmp, "%Y-%m-%d")); ?>
</li>
                                            <li><?php echo $this->_tpl_vars['vo']['price']; ?>
</li>
                                            <li>
                                                <input type="hidden" name="product_id[]" value="<?php echo $this->_tpl_vars['vo']['id']; ?>
"/>
                                                <?php if ($this->_tpl_vars['parent_product']['is_seat'] == 1): ?>
                                                <input type="text" class="gm_num" name="num[]"  value="<?php echo $this->_tpl_vars['vo']['buy_num']; ?>
" data-price="<?php echo $this->_tpl_vars['vo']['price']; ?>
" data-stock="<?php echo $this->_tpl_vars['vo']['stock']; ?>
" readonly />
                                                <?php elseif ($this->_tpl_vars['parent_product']['buy_limit'] > 0): ?>
                                                <input type="text" class="gm_num" name="num[]"  value="<?php echo $this->_tpl_vars['vo']['buy_num']; ?>
" data-price="<?php echo $this->_tpl_vars['vo']['price']; ?>
" data-stock="<?php echo $this->_tpl_vars['vo']['stock']; ?>
" readonly />
                                                <?php else: ?>
                                                <span class="down">-</span>
                                                <input type="text" class="gm_num" name="num[]"  value="<?php echo $this->_tpl_vars['vo']['buy_num']; ?>
" data-price="<?php echo $this->_tpl_vars['vo']['price']; ?>
" data-stock="<?php echo $this->_tpl_vars['vo']['stock']; ?>
" readonly />
                                                <span class="up">+</span>
                                                <?php endif; ?>
                                            </li>
                                            <li>&yen;<span class="singleprice"><?php echo $this->_tpl_vars['vo']['price']; ?>
</span></li>
                                        </ul>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </dd>
                                </dl>
                            </div>


                            <!--是否配送方式-->
                            <div class="zhifu_fs order3">
                                <h3>配送方式</h3>
                                <ul>
                                    <li class="h1">
                                        <div class="i1 kdps"><img src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/images/kdps.jpg" /></div>
                                        <?php if ($this->_tpl_vars['parent_product']['is_door_self'] == 1): ?>
                                        <div class="i1 smqp"><img src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/images/smqp.jpg" /></div>
                                         <?php endif; ?>
                                    </li>
                                    
                                    <li class="h2">
                                        <div class="i1 express_way"><input type="radio" name="delivery_way" checked="checked" value="express"/></div>
                                         <?php if ($this->_tpl_vars['parent_product']['is_door_self'] == 1): ?>  
                                        <div class="i1 pickup_way"><input type="radio" name="delivery_way"  value="pickup"/></div>
                                         <?php endif; ?>
                                    </li>
                                   
                                </ul>
                            </div>
                            <?php if ($this->_tpl_vars['parent_product']['is_real_name'] == 1): ?>
                            <div class="yd_msg" >
                                <h3>实名制信息<span></span></h3>
                                <div class="msg_con">
                                    <dl>
                                        <dt>姓名：</dt>
                                        <dd><input type="text" class="msg_text_two" name="real_user_name" id="real_user_name" value="<?php echo $this->_tpl_vars['card_check']['real_user_name']; ?>
" /></dd>
                                    </dl>
                                    <dl>
                                        <dt>证件类型：</dt>
                                        <dd>
                                            <select name="real_card_type" id="real_card_type"  class="msg_text_two" style=" width: 305px; height: 30px; line-height: 30px;">
                                                <option value="1" <?php if ($this->_tpl_vars['card_check']['real_card_type'] == 1): ?> selected <?php endif; ?> >身份证</option>
                                                <option value="2" <?php if ($this->_tpl_vars['card_check']['real_card_type'] == 2): ?> selected <?php endif; ?> >护照</option>
                                            </select>
                                        </dd>
                                    </dl>
                                    <dl>
                                        <dt>证件号码：</dt>
                                        <dd><input type="text" class="msg_text_two" name="real_card_no" id="real_card_no" value="<?php echo $this->_tpl_vars['card_check']['real_card_no']; ?>
" /></dd>
                                    </dl>


                                </div>
                            </div>
                            <?php endif; ?>


                            <div class="yd_msg" id="is_exp">
                                <h3>收货信息<span></span></h3>
                                <div class="msg_con">
                                    <dl>
                                        <dt>收货人：</dt>
                                        <dd><input type="text" name="ship_name" id="ship_name" class="msg_text" value="<?php echo $this->_tpl_vars['consignee']['name']; ?>
" /><span>（*此处可输入收件人姓名)</span></dd>
                                    </dl>
                                    <dl>
                                        <dt>联系手机：</dt>
                                        <dd><input type="text" class="msg_text" name="ship_mobile" id="ship_mobile" value="<?php echo $this->_tpl_vars['consignee']['mobile']; ?>
" /></dd>
                                    </dl>

                                    <dl>
                                        <dt>省市区：</dt>
                                        <dd>
                                            <select name="provinceid" id="provinceid"  class="msg_text" style="margin-right: 5px;">
                                                <option value="">请选择</option>
                                                <?php $_from = $this->_tpl_vars['prov']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['vo']):
?>
                                                <option value="<?php echo $this->_tpl_vars['vo']['id']; ?>
" <?php if ($this->_tpl_vars['vo']['id'] == $this->_tpl_vars['consignee']['provinceid']): ?> selected <?php endif; ?> ><?php echo $this->_tpl_vars['vo']['name']; ?>
</option>
                                                <?php endforeach; endif; unset($_from); ?>
                                            </select>

                                            <select name="cityid" id="cityid"  class="msg_text"  style="margin-right: 5px;">
                                                <option value="">请选择</option>
                                                <?php if (! empty ( $this->_tpl_vars['consignee']['cityid'] )): ?>
                                                <option value="<?php echo $this->_tpl_vars['consignee']['cityid']; ?>
" selected><?php echo ((is_array($_tmp=$this->_tpl_vars['consignee']['cityid'])) ? $this->_run_mod_handler('get_city_name', true, $_tmp) : get_city_name($_tmp)); ?>
</option>
                                                <?php endif; ?>
                                            </select>

                                            <select name="areaid" id="areaid"  class="msg_text">
                                                <option value="">请选择</option>
                                                <?php if (! empty ( $this->_tpl_vars['consignee']['areaid'] )): ?>
                                                <option value="<?php echo $this->_tpl_vars['consignee']['areaid']; ?>
" selected><?php echo ((is_array($_tmp=$this->_tpl_vars['consignee']['areaid'])) ? $this->_run_mod_handler('get_city_name', true, $_tmp) : get_city_name($_tmp)); ?>
</option>
                                                <?php endif; ?>
                                            </select>
                                        </dd>
                                    </dl>

                                    <dl>
                                        <dt>街道地址：</dt>
                                        <dd><textarea class="msg_area" name="ship_addr" id="ship_addr" cols="" rows=""><?php echo $this->_tpl_vars['consignee']['address']; ?>
</textarea><span>（*此处可输入收件地址或备注信息等)</span></dd>
                                    </dl>
                                </div>
                            </div>

                              <div class="yd_msg" id="is_door" style="display: none;">
                                <h3>取票信息<span></span></h3>
                                <div class="msg_con">
                                    <dl>
                                        <dt>取票人：</dt>
                                        <dd><input type="text" name="pick_name" id="pick_name" class="msg_text" value="" /><span>（*此处可输入取票人姓名)</span></dd>
                                    </dl>
                                    <dl>
                                        <dt>联系手机：</dt>
                                        <dd><input type="text" class="msg_text" name="pick_mobile" id="pick_mobile" value="" /></dd>
                                    </dl>

                                    <dl>
                                        <dt>取票城市：</dt>
                                        <dd>
                                            <select name="pick_provinceid" id="pick_provinceid"  class="msg_text" style="margin-right: 5px;">
                                                <option value="">请选择</option>
                                                <?php $_from = $this->_tpl_vars['pickup_city']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['vo']):
?>
                                                <option value="<?php echo $this->_tpl_vars['vo']['id']; ?>
" ><?php echo $this->_tpl_vars['vo']['city_name']; ?>
</option>
                                                <?php endforeach; endif; unset($_from); ?>
                                            </select>
                                        </dd>
                                    </dl>

                                    <dl>
                                        <dt>取票地址：</dt>
                                        <dd><textarea class="msg_area" name="pick_addr" id="pick_addr" cols="" rows=""></textarea><span>温馨提示：（*请持订票人身份证原件上门自取，代领需出示订票人以及代领人身份证原件)</span></dd>
                                    </dl>
                                </div>
                            </div>

                            <!--电子票信息-->
                            <?php if ($this->_tpl_vars['parent_product']['is_electronic_ticket'] == 1): ?>
                            <div class="yd_msg">
                                <h3>电子票信息<span></span></h3>
                                <div class="msg_con">
                                    <dl>
                                        <dt>身份证：</dt>
                                        <dd><input type="text" name="id_card" id="id_card" class="msg_text" value="" /></dd>
                                    </dl>
                                    <dl>
                                        <dt>学生证：</dt>
                                        <dd><input type="text" class="msg_text" name="student_card" id="student_card" value="" /></dd>
                                    </dl>

                                </div>
                            </div>
                            <?php endif; ?>

                            <!--支付方式-->
                            <div class="zhifu_fs">
                                <h3>支付方式</h3>
                                <div class="fs_con">
                                    <dl>
                                        <dt>在线支付方式</dt>
                                        <dd>
                                            <ul>
                                                <li>
                                                <label>
                                                    <em><img class="fl" src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/images/zfb_ico.gif" alt="支付宝" /></em>
                                                    <span>即时到账</span>
                                                    <input type="radio" name="pay_type" checked value="alipay">
                                                </label>
                                            </li>
                                                <!--<li>-->
                                                <!--<label>-->
                                                    <!--<em><img class="fl" src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/images/tenpay.gif" alt="财付通" width="120px" /></em>-->
                                                    <!--<span>财付通</span>-->
                                                    <!--<input type="radio" name="pay_type" value="tenpay">-->
                                                <!--</label>-->
                                            <!--</li>-->
                                                <li>
                                                <label>
                                                    <em><img class="fl" src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/images/cbp.gif" alt="网银在线" width="120px" /></em>
                                                    <span>网银在线</span>
                                                    <input type="radio" name="pay_type" value="cbp" data-type="网银在线">
                                                </label>
                                                </li>

                                                <!--<li>-->
                                                    <!--<label>-->
                                                        <!--<em><img class="fl" src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/templates/default/images/zfb_ico.gif" alt="货到付款" width="120px" /></em>-->
                                                        <!--<span>货到付款</span>-->
                                                        <!--<input type="radio" name="pay_type" value="cod" data-type="货到付款">-->
                                                    <!--</label>-->
                                                <!--</li>-->

                                            </ul></dd></dl>
                                </div>
                            </div>
                            <!--支付方式end-->
                            <div class="yd_msg" id="send_ticket" style="display: none;">
                                <h3>发票信息<span></span></h3>
                                <div class="msg_con">
                                    <span style="color:#e77817">温馨提示：如需报销发票，将在演出/活动结束后统一由演出主办方按照订单票面实际金额开具。以快递到付的形式送达。中国大陆以外地区演出/活动无法提供发票。</span>
                                    <dl>
                                        <dt>类型</dt>
                                        <dd>


                                            <select name="invoice_type" id="invoice_type"  class="msg_text" style="margin-right: 5px;">
                                                <option value="">请选择</option>
                                                <option value="1">个人</option>
                                                <option value="2">企业</option>

                                            </select>


                                        </dd>
                                    </dl>
                                    <div style="display: none;" id="show_invoice_detail">
                                        <dl>
                                            <dt>发票抬头</dt>
                                            <dd><input type="text" class="msg_text"  name="invoice_company" value="" /></dd>
                                        </dl>

                                        <dl>
                                            <dt>寄票地址：</dt>
                                            <dd>
                                                <textarea class="msg_area"  name="invoice_addr" ></textarea>

                                            </dd>
                                        </dl>

                                    </div>


                                </div>
                            </div>
                            <!--订单金额-->
                            <div class="order_money">
                                <p><em>我要开发票: <input type="checkbox" name="send_invoice" value="1" /> </p>
                                <!--<p><em>验证码：<input class="cd-txt" name="checkcode" value="" id="yzm_code" type="text"/><img  class="wd_yzm" src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/includes/rand_func.php?rand=<?php echo $this->_tpl_vars['now_time']; ?>
" width="80" height="30"  onclick="this.src = '<?php echo $this->_tpl_vars['config']['weburl']; ?>
/includes/rand_func.php?rand=' + Math.random()" /></em></p>-->
                                <p><em>座位:</em>
                                    <?php $_from = $this->_tpl_vars['product_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['vo']):
?>


                                    <input type="hidden" name="spot_model_id[]" value=<?php echo $this->_tpl_vars['vo']['un_seat_model_id']; ?>
 />
                                    <input type="hidden" name="seat_seat_row[]" value=<?php echo $this->_tpl_vars['vo']['un_seat_seat_row']; ?>
 />
                                    <input type="hidden" name="seat_seat_cols[]" value=<?php echo $this->_tpl_vars['vo']['un_seat_seat_cols']; ?>
 />

                                    <?php if (empty ( $this->_tpl_vars['vo']['seat_model_id'] ) || empty ( $this->_tpl_vars['vo']['seat_seat_row'] ) || empty ( $this->_tpl_vars['vo']['seat_seat_cols'] )): ?>
                                    择优分配位置
                                          <?php else: ?>
                                    <?php $_from = $this->_tpl_vars['vo']['seat_model_id']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['seat']):
?>

                                    ￥<?php echo $this->_tpl_vars['vo']['price']; ?>
(<?php echo ((is_array($_tmp=$this->_tpl_vars['seat'])) ? $this->_run_mod_handler('get_spot_model_name', true, $_tmp) : get_spot_model_name($_tmp)); ?>
<?php echo $this->_tpl_vars['vo']['seat_seat_row'][$this->_tpl_vars['k']]; ?>
排<?php echo $this->_tpl_vars['vo']['seat_seat_cols'][$this->_tpl_vars['k']]; ?>
座)&nbsp;
                                    <?php endforeach; endif; unset($_from); ?>
                                    <?php endif; ?>
                                    <?php endforeach; endif; unset($_from); ?>

                                </p>
                                <?php if ($this->_tpl_vars['points'] > 0): ?>
                                <p><em>积分抵扣: <input type="checkbox" name="cost_point" value="<?php echo $this->_tpl_vars['points']; ?>
" /> <?php echo $this->_tpl_vars['points']; ?>
 元</em></p>
                               <?php endif; ?>
                                <p><em>订单金额：&yen;<span class="totalprice" id="totalprice"><?php echo $this->_tpl_vars['total_price']; ?>
</span>元</em></p>

                                <p> <em><input type="checkbox" name="agreement" value="1" checked /> 我已阅读并同意 <a href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/help.php?action=detail&con_id=19" style="color: #0A8CD2;">海峡票务用户服务协议</a></em> </p>

                            </div>


                            <!--预定按钮-->
                            <div class="tj_btn_order">
                                <input type="hidden" name="spot_id" value="<?php echo $this->_tpl_vars['spot_id']; ?>
" />
                                <a href="javascript:;" class="btnsaveorder">提交订单</a>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <script type="text/javascript">

            function get_total_price(){
                var total_price = parseFloat(0);
                $(".cp_num_con").find('.gm_num').each(function(i){
                    num = $(this).val();
                    price = $(this).attr('data-price');
                    sing_price = parseInt(num)*parseFloat(price);
                    $(this).parent().next().find(".singleprice").html(sing_price.toFixed(2));
                    total_price = total_price + sing_price;
                });
                $("#totalprice").html(total_price.toFixed(2));
            }

            $("#provinceid").on('change',function(){
                var provinceid = $(this).val();
                $.post("<?php echo $this->_tpl_vars['config']['weburl']; ?>
/ajax.php",{action:'get_city',id:provinceid},function(ret){
                     ret = eval('('+ret+')');
                     $("#cityid").html(ret.content);
                });
            });
            $("#cityid").on('change',function(){
                var cityid = $(this).val();
                $.post("<?php echo $this->_tpl_vars['config']['weburl']; ?>
/ajax.php",{action:'get_city',id:cityid},function(ret){
                     ret = eval('('+ret+')');
                     $("#areaid").html(ret.content);
                });
            });
            $("#invoice_person").on('click',function(){
                $("#invoice_head").hide();
            });
            $("#invoice_company").on('click',function(){
                $("#invoice_head").show();
             });

 //选择发票
    $("#invoice_type").on("change",function(){
        if( '' != $(this).val()) {
            $("#show_invoice_detail").show();
        } else {
            $("#show_invoice_detail").hide();
        }
    });

//上门取票
$("[name='delivery_way']").on('click',function(){
    var is_door_value = $(this).val();
    if(is_door_value == 'pickup'){
        $("#is_door").show();
        $("#is_exp").hide();
    } else {
        $("#is_exp").show();
        $("#is_door").hide();
        $("#pick_name").val('');
        $("#pick_mobile").val('');
        $("#pick_provinceid").val('');
        $("#pick_addr").val('');
    }
});
            //选择取票城市
            $("[name='pick_provinceid']").on('change',function(){
                var id = $(this).val();
                $.post("<?php echo $this->_tpl_vars['config']['weburl']; ?>
/ajax.php",{id:id,action:"pick_city_info"},function(ret){
                    ret = eval('('+ret+')');
                    $("#pick_addr").val(ret.msg);
                });
            });

            //开发票
            $("[name='send_invoice']").on("click",function(){
                if($(this).is(":checked")){
                    $("#send_ticket").show();
                } else {
                    $("#send_ticket").hide();
                }
            });



         //增加数量
            $(".up").on('click',function(){
                stock = $(this).prev().attr('data-stock');
                value = $(this).prev().val();
                up_value = parseInt(value) + 1;
                if(up_value <= stock ){
                    $(this).prev().val(up_value)
                    get_total_price();
                } else {
                    alert("库存不足");
                }

            });

            //减少数量
            $(".down").on('click',function(){
                value = $(this).next().val();
                up_value = parseInt(value) - 1;
                if(value != 1){
                    $(this).next().val(up_value)
                    get_total_price();
                }
            });

            $(".btnsaveorder").on('click',function(){
                if(!$("[name='agreement']").is(":checked")){
                    alert("请同意用户服务协议"); return false;
                }
                $("#order_form").submit();
            });

//            $("#yzm_code").blur(function(){
//                var yzm_code =  $("#yzm_code").val();
//                $.get("<?php echo $this->_tpl_vars['config']['weburl']; ?>
/ajax_back_end.php",{yzm:yzm_code},function(ret){
//                    if(ret === 'false'){
//                        alert("验证码错误");
//                    }
//                });
//            });

            $("#real_card_no").on('blur',function(){
                var real_card_type = $("#real_card_type").val();
                var real_card_no = $("#real_card_no").val();
                $.post("<?php echo $this->_tpl_vars['config']['weburl']; ?>
/ajax.php",{real_card_type:real_card_type,real_card_no:real_card_no,action:'check_card_no'},function(ret){
                   ret = eval('('+ret+')');
                    if(!ret.status){
                     alert(ret.msg);
                    }
                });
            });


            function check_data(){
                var delivery_way = $("[name='delivery_way']:checked").val();
                var ship_name = $("#ship_name").val();
                var ship_mobile = $("#ship_mobile").val();
                var provinceid = $("#provinceid").val();
                var cityid = $("#cityid").val();
                var areaid = $("#areaid").val();
                var ship_addr = $("#ship_addr").val();
                var yzm_code =  $("#yzm_code").val();
                var send_invoice = $("[name='send_invoice']:checked").val();
                if(delivery_way == 'express'){
                    if(ship_name == ''){
                        alert("请填写收货人信息");
                        return false;
                    }
                    if(ship_mobile == '') {
                        alert("请填写联系手机");
                        return false;
                    }
                    if(provinceid == '') {
                        alert("请选择省");
                        return false;
                    }
                    if(cityid == '') {
                        alert("请选择市");
                        return false;
                    }
                    if(areaid == '') {
                        alert("请选择区");
                        return false;
                    }
                    if(ship_addr == '') {
                        alert("请填写街道地址");
                        return false;
                    }
                }

                if(delivery_way == 'pickup'){
                    var pick_name = $("#pick_name").val();
                    var pick_mobile = $("#pick_mobile").val();
                    var pick_provinceid = $("#pick_provinceid").val();
                    var pick_addr = $("#pick_addr").val();
                    if(pick_name == ''){
                        alert("请填写取票人姓名");
                        return false;
                    }
                    if(pick_mobile == ''){
                        alert("请填写取票人联系手机");
                        return false;
                    }
                    if(pick_provinceid == ''){
                        alert("请选择取票城市");
                        return false;
                    }
                    if(pick_addr == ''){
                        alert("请填写取票地址");
                        return false;
                    }
                }


                <?php if ($this->_tpl_vars['parent_product']['is_real_name'] == 1): ?>
                var real_user_name = $("#real_user_name").val();
                var real_card_type = $("#real_card_type").val();
                var real_card_no = $("#real_card_no").val();
                if(real_user_name == ''){
                    alert("请填写实名认证的姓名");
                    return false;
                }
                if(real_card_type == ''){
                    alert("请选择证件类型");
                    return false;
                }
                if(real_card_no == ''){
                    alert("请填写正价号码");
                    return false;
                }
               if(real_card_no != ''){
                   var real_card_type = $("#real_card_type").val();
                   var real_card_no = $("#real_card_no").val();
                   $.post("<?php echo $this->_tpl_vars['config']['weburl']; ?>
/ajax.php",{real_card_type:real_card_type,real_card_no:real_card_no,action:'check_card_no'},function(ret){
                       ret = eval('('+ret+')');
                       if(!ret.status){
                           alert(ret.msg);
                           return false;
                       } else {
                           return true;
                       }
                   });
               }



                <?php endif; ?>

                if(send_invoice == 1){
                    var invoice_type = $("#invoice_type").val();
                    var invoice_company = $("#invoice_company").val();
                    var invoice_addr = $("#invoice_addr").val();
                    if(invoice_type == ''){
                        alert("请选择发票类型");
                        return false;
                    }
                    if(invoice_company == ''){
                        alert("请填写发票抬头");
                        return false;
                    }
                    if(invoice_addr == ''){
                        alert("请填写寄票地址");
                        return false;
                    }
                }
                return true;


            }

            //选择配送
            $(".kdps").on("click",function(){
                $(".express_way input").attr("checked","checked");
                $("#is_exp").show();
                $("#is_door").hide();
            });
            $(".smqp").on("click",function(){
                $(".pickup_way input").attr("checked","checked");
                $("#is_door").show();
                $("#is_exp").hide();
            });

        </script>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.htm", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
